#{extends 'main.html' /}
#{set title:'Search' /}

<div class="pagetitle">Search</div>

<p>
    <form method="GET" action="@{Page.search}">
    <input name="q" type="text" size="50" value="${q}"/>
    <type="submit" value="Search"/>
    </form>
</p>

<p>
<table>
%{ for(result in results) { }%
<tr>
    <td rowspan="2" class="score">${String.format('%(2.0f', result.score * 100)}%</td>
    <td><a href="@{Page.show}/${result.name}">${result.name}</a></td>
</tr>
<tr>
    <td>${String.format('%tF %<tT', result.date)}</a></td>
</tr>
%{ } }%
</table>
</p>